﻿package mortal.game.view.heroArena.view
{
    import Message.Public.*;
    import com.mui.controls.*;
    import com.mui.utils.*;
    import extend.language.*;
    import mortal.game.resource.*;
    import mortal.game.view.common.*;

    public class HeroArenaTemInfoSpr extends GSprite
    {
        private var _teamLeader:HeroArenaTeamInfoCell;
        private var _teamField:HeroArenaTeamInfoCell;
        private var _data:SArena2v2Team;

        public function HeroArenaTemInfoSpr()
        {
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            this.pushUIToDisposeVec(UIFactory.bg(0, 0, 279, 23, this, ImagesConst.RegionTitleBg));
            this.pushUIToDisposeVec(UIFactory.gTextField(Language.getString(41649), 28, 6 - 5, 103, 20, this));
            this.pushUIToDisposeVec(UIFactory.gTextField(Language.getString(41645), 142, 6 - 5, 75, 20, this));
            this.pushUIToDisposeVec(UIFactory.gTextField(Language.getString(41646), 231, 6 - 5, 48, 20, this));
            this._teamLeader = UICompomentPool.getUICompoment(HeroArenaTeamInfoCell);
            this._teamLeader.y = 25 - 2;
            this.addChild(this._teamLeader);
            this._teamField = UICompomentPool.getUICompoment(HeroArenaTeamInfoCell);
            this._teamField.y = 67 - 2;
            this.addChild(this._teamField);
            return;
        }// end function

        public function set data(param1:SArena2v2Team) : void
        {
            this._data = param1;
            if (this._data)
            {
                this._teamLeader.data = this._data.captainPlayer;
                this._teamField.data = this._data.memberPlayer;
            }
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            super.disposeImpl();
            this._teamLeader.dispose();
            this._teamLeader = null;
            this._teamField.dispose();
            this._teamField = null;
            this._data = null;
            return;
        }// end function

    }
}
